<div class="mbx">
  <div class="col-lg-12 index">
    <i class="glyphicon glyphicon-home"></i>
    首页 > <a href="admin/index">控制台</a>
  </div>
</div>
 <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
   <div class="col-md-12" align="center">
    <div id="main" class="col-xs-12"  style="height: 750px;">
    	
    	<table class="" style=" width:100%;">
    		<tr >
    			<td id="focusedCount" style=" padding:10px;">
    			  <div class="top-sk-dis01 color-01">
    			     <div class="d01" >●  我的模型   ●</div>
    			     <p class="p02" id="mymodel">9</p>
    			     <p class="p03">
    			       <span></span>
    			       <a href="admin/index#admin/manage/63"> <img src="assets/htwj/more.png">&nbsp;&nbsp;更多详情</a>
    			     </p>
    			  </div>
    			</td>
    			<td id="focusedCount" style=" padding:10px;">
    			  <div class="top-sk-dis01 color-02">
    			     <div class="d01" >●  我的收藏   ●</div>
    			     <p class="p02" id="mycollect">23</p>
    			     <p class="p03">
    			       <span></span>
    			       <a href="admin/index#admin/manage/67"> <img src="assets/htwj/more.png">&nbsp;&nbsp;更多详情</a>
    			     </p>
    			  </div>
    			</td>
    			<td id="focusedCount" style=" padding:10px;">
    			  <div class="top-sk-dis01 color-03">
    			     <div class="d01" >●  我共享的   ●</div>
    			     <p class="p02" id="myshared">3</p>
    			     <p class="p03">
    			       <span></span>
    			       <a href="admin/index#admin/manage/63"> <img src="assets/htwj/more.png">&nbsp;&nbsp;更多详情</a>
    			     </p>
    			  </div>
    			</td>
    			<td id="focusedCount" style=" padding:10px;">
    			  <div class="top-sk-dis01 color-04">
    			     <div class="d01" >●  预约打印   ●</div>
    			     <p class="p02" id="reserveNum">4</p>
    			     <p class="p03">
    			       <span></span>
    			       <a href="admin/index#admin/manage/66"> <img src="assets/htwj/more.png">&nbsp;&nbsp;更多详情</a>
    			     </p>
    			  </div>
    			</td>
    			
    			
    			
    		</tr>
    	</table>
    <div class="col-md-6 col-sm-12">
   <!--  <h3>近一周用户活跃度情况统计图</h3> -->
    	<div id="main" style="height:400px;padding-top: 25px;padding-left: 45px;"></div>
    </div>
	<div class="col-md-6 col-sm-12">
		<div id="main" style="height:400px;padding-top: 25px;padding-left: 45px;"></div>
	</div>
    </div>
  
	</div>
<script type="text/javascript" src="assets/js/echarts.min.js"></script>
 

<script type="text/javascript">
	function init(){
		/* $.get("admin/s_statistics",function(data){
			if(data.code == 0){
				//$("#mymodel").html(data.content.mymodel);
				$("#mycollect").html(data.content.mycollect);
				$("#myshared").html(data.content.myshared);
				//$("#appointmentprint").html(data.content.appointmentprint);
			}
		}); */
		$.get("threed/getThreedNum2",function(data){//模型数量
			if(data.code == 0){
				$("#mymodel").html(data.content);
			}
		});
		$.get("threedKeep/getThreedKeepNum",function(data){//我的收藏
			if(data.code == 0){
				$("#mycollect").html(data.content);
			}
		});
		$.get("threed/getThreedNum3",function(data){//我的共享
			if(data.code == 0){
				$("#myshared").html(data.content);
			}
		});
		$.get("printerReserve/reserveNum",function(data){//预约数量
			if(data.code == 0){
				$("#reserveNum").html(data.content);
			}
		});
		 //getActiveData();
		 //getRegistData();
	}
	init();
	
	function getActiveData(){
		 $.post("materials/statistics",function(data){
			 
			 var myChart = echarts.init(document.getElementById('main2'));
			 var option;
			 option = {
			             title: {
			            	 text: '物料使用情况统计图单位（克）',
			            }, 
			            tooltip: {},
			            legend: {
			            	  data:['剩余数量'],
			            	  x: 'right'
			            },
			            grid: {
					        left: '3%',
					        right: '4%',
					        bottom: '3%',
					        containLabel: true
					    },
			            xAxis: {
			            	  data: data.Xdata
			            },
			            yAxis: {},
			            series: [{
			            	name:'剩余数量',
			                type: 'bar',
			                data: data.Ydata
			            }]
			        };

			 myChart.setOption(option);
			 
		 });
	 }
	
	function getRegistData(){//
		 $.post("log/getWeekUserActiveData",function(data){
			 var myChart = echarts.init(document.getElementById('main1'));
			 var option;
			 option = {
					    title: {
					        text: '近一周用户活跃度情况统计图',
					    },
					    tooltip: {
					        trigger: 'axis'
					    },
					    legend: {
					        data:['活跃人数'],
					        x: 'right'
					    },
					    grid: {
					        left: '3%',
					        right: '4%',
					        bottom: '3%',
					        containLabel: true
					    },
					    toolbox: {
					        
					    },
					    xAxis: {
					        type: 'category',
					        boundaryGap: false,
					        data: data.Xdata
					    },
					    yAxis: {
					        type: 'value'
					    },
					    series: [
					        {
					            name:'活跃人数',
					            type:'line',
					            stack: '总量',
					            data: data.Ydata
					        }
					    ]
					};

			 myChart.setOption(option);
			 
		 });
	 }
</script>